<%@ Page language="c#" Codebehind="PageSecurity.aspx.cs" AutoEventWireup="True" Inherits="CrossFactory.SiteNote.Admin.PageSecurity" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML xmlns="http://www.w3.org/1999/xhtml" >
	<HEAD>
		<title>Page Security</title> 
		<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		<LINK href="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Stylesheets/StyleSheet.aspx" type="text/css" rel="stylesheet">
		<script language="javascript" src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Scripts/website.js"></script>
		
		<script language="javascript">
			function EndSave()
			{
				window.opener.navigate(window.opener.location);
				//window.opener.__doPostBack('', null);
				window.close();
			}
			function load()
			{				
				ResizeDialogBoxSiteNote();
			}
			function Custom(obj, clientid, rolename)
            {
                var radio;
	            var url;
	            var returnUrl;
	            var href;
	            var pos;
	            var app;
	            var val;
	            
	            val = 0;
	            app = '<%=CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>';
	            //radio = document.all['listRoles2$ctl01$RadioButtonList'];
	            radio = document.all[clientid];
	            for (i=0;i<radio.length;i++){
                if (radio[i].checked==true)
                    val = radio[i].value;
                }

	            
	            //alert(rolename);
	
	            pos = window.location.href.indexOf('?');
	            if (pos != -1)
	            {
		            href = window.location.href.substring(0,pos);
	            }
	            else
	            {
		            href = window.location.href;
	            }
            	
	            url = app + "/Admin/PageSecurityCustom.aspx";
	            url += "?CurrentPage=" + encodeURIComponent('<%= HttpContext.Current.Request.QueryString["CurrentPage"] %>');
	            url += "&RoleName=" + rolename;
	            url += "&PagePermission=" + val;
	            dialog = window.open(url, "new", "height=740,width=300,channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,status=no,scrollbars=yes");
	            //dialog.opener = window.opener;
	            dialog.focus();
            }
		</script>
	</HEAD>
	<body topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
		<form id="Form1" method="post" runat="server">
			<a id="size">
				<table cellSpacing="0" cellPadding="0" width="100%" border="0">
					<tr>
						<td vAlign="top" width="100%" height="32">
							<table height="32" cellSpacing="0" cellPadding="0" width="100%" border="0">
								<tr>
									<td align="left" width="154" background="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Layout/TopBackground.gif" colSpan="2" height="19"><IMG height="19" src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Layout/TopLeft.gif" width="154"></td>
									<td align="right" width="100%" background="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Layout/TopBackground.gif" height="32" rowSpan="2"><IMG height="32" src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Layout/logo.gif" width="165"></td>
								</tr>
								<tr height="13">
									<td width="7" background="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Layout/LeftBackgroundTop.gif" height="13"><IMG height="13" src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="7"></td>
									<td width="147" height="13"><IMG height="13" src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="147"></td>
								</tr>
							</table>
						</td>
					</tr>
					<tr height="100%">					
						<td vAlign="top" width="100%" height="100%">
							<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
								<tr>
									<td width="7" background="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Layout/LeftBackgroundBottom.gif"><IMG height="1" src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="7"></td>
									<td width="5"><IMG height="1" src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="5"></td>
									<td>
										<table>
											<tr>
												<td class="cmMessageTitle"><b>Page security : </b></td>
											</tr>
											<tr>		
												<td class="permissions">
													<asp:Label ID="lblPermissions" Runat="server" CssClass="permissions">Permissions :</asp:Label>
													<table class="permissionsTable">
														<asp:Repeater ID="listRoles2" Runat="server">
															<HeaderTemplate>
																<tr bgcolor="#b4cdeb">
																	<td align="center" style="padding:5px 5px 5px 5px;"><strong>Role name</strong></td>
																	<td align="center" style="padding:5px 5px 5px 5px;">Inherited</td>
																	<td align="center" style="padding:5px 5px 5px 5px;">Permission<img src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" height="1" width="400"></td>
																	<td></td>
																</tr>
															</HeaderTemplate>
															<ItemTemplate>
																<tr bgcolor="#d8e5f5">
																	<td align="left" style="padding:5px 5px 5px 5px;">
																		<input type="hidden" runat="server" id="RoleName" value='<%# Container.DataItem %>' NAME="RoleName"/>
																		<%# Container.DataItem %>
																	</td>
																	<td><asp:CheckBox runat="server" ID="CheckBoxNotHeritedPermission" AutoPostBack="true" OnCheckedChanged="chkbox_CheckedChanged" /></td>
																	<td width="450">
																       <nobr> <asp:RadioButtonList ID="RadioButtonList" runat="server" RepeatDirection="Horizontal" RepeatLayout=Flow >
																        </asp:RadioButtonList>
																        </nobr>
																    </td>
																    <td>
																        <button runat="server" id="CustomPermission">Advanced</button>
																    </td>
																</tr>
															</ItemTemplate>
															
														</asp:Repeater>
													</table>
												</td>
											</tr>
										</table>
									</td>
									<td width="5"><IMG height="1" src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="5"></td>
									<td width="11" background="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Layout/RightBackground.gif"><IMG height="1" src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="11"></td>
								</tr>
							</table>
						</td>
					</tr>
					<tr height="40">
						<td>
							<table height="100%" cellSpacing="0" cellPadding="0" border="0">
								<tr>
									<td height="8"><IMG src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Layout/FooterLeft.gif"></td>
									<td width="100%">
										<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
											<tr>
												<td width="100%" background="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Layout/FooterCenter.gif" height="8"></td>
												<td height="8"><IMG height="8" src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Layout/FooterRight.gif" width="255"></td>
											</tr>
										</table>
									</td>
								</tr>
								<tr>
									<td align="right" width="100%" colSpan="2" border="0">
										<table style="BACKGROUND: url(<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Layout/Footer.gif) no-repeat right 50%" height="100%" width="100%" border="0">
											<tr>
												<td width="100%"></td>
												<td><asp:Button id="btnSave" runat="server" Text="Save" Width="75" Height="23" CssClass="cmtext" onclick="btnSave_Click"></asp:Button></td>
												<td><input type="button" value="Close" onclick="window.close();" style="WIDTH:75px;HEIGHT:23px" class="cmtext"></td>
												<td width="1"></td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</a>
		</form>
	</body>
</HTML>


